// g++ -D COMPILER_SERVER 编译代码时加宏定义即可去掉下面调包含语句
#ifndef COMPILER_SERVER
#include "header.cpp"
#endif

void Test1()
{
    vector<int> nums = { 2,7,11,15 };
    vector<int> ret = Solution().twoSum(nums, 9);
    if (find(ret.begin(), ret.end(), 0) != ret.end() &&
        find(ret.begin(), ret.end(), 1) != ret.end())
    {
        std::cout << "通过测试用例1" << std::endl;
    }
    else
    {
        std::cout << "测试用例1失败" << std::endl;
    }
}

void Test2()
{
    vector<int> nums = { 3,2,4 };
    vector<int> ret = Solution().twoSum(nums, 6);
    if (find(ret.begin(), ret.end(), 2) != ret.end() &&
        find(ret.begin(), ret.end(), 4) != ret.end())
    {
        std::cout << "通过测试用例2" << std::endl;
    }
    else
    {
        std::cout << "测试用例2失败" << std::endl;
    }
}

void Test3()
{
    vector<int> nums = { 3,3 };
    vector<int> ret = Solution().twoSum(nums, 6);
    if (find(ret.begin(), ret.end(), 0) != ret.end() &&
        find(ret.begin(), ret.end(), 1) != ret.end())
    {
        std::cout << "通过测试用例1" << std::endl;
    }
    else
    {
        std::cout << "测试用例1失败" << std::endl;
    }
}

int main()
{
    Test1();
    Test2();
    Test3();

    return 0;
}